package jmine.tec.web.front.domain;

import bancosys.tec.exception.LocalizedMessageHolder;
import bancosys.tec.exception.MessageCreator;
import bancosys.tec.exception.MessageCreatorHelper;

/**
 * Possible outcomes of a request revision
 * 
 * @author lundberg
 */
public enum BackOfficeRequestRevisionOutcome implements MessageCreator {
    AUTHORIZED("jmine.tec.web.front.domain.revision.outcome.authorized"), REJECTED("jmine.tec.web.front.domain.revision.outcome.rejected"),
    NEUTRAL("jmine.tec.web.front.domain.revision.outcome.neutral");

    private final MessageCreator outcomeDescription;

    /**
     * C'tor
     * 
     * @param nameKey - name of the month
     */
    private BackOfficeRequestRevisionOutcome(String nameKey) {
        this.outcomeDescription = MessageCreatorHelper.creator("jmine-tec-web-front-messages", nameKey, 0);
    }

    /**
     * @return the monthName
     */
    public LocalizedMessageHolder getOutcomeDescription() {
        return this.outcomeDescription.create();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return this.getOutcomeDescription().getMessage();
    }

    /**
     * {@inheritDoc}
     */
    public LocalizedMessageHolder create(Object... arguments) {
        return this.outcomeDescription.create(arguments);
    }

    /**
     * {@inheritDoc}
     */
    public int getExpectedArguments() {
        return this.outcomeDescription.getExpectedArguments();
    }
}
